<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head th:include="css :: css">

</head>
<body style="overflow: hidden;opacity: 1">

<div id="cl-wrapper" style="padding-top: 0">
    <div class="container-fluid">
        <div class="cl-mcont">
            <div class="row">
                <div class="col-md-12">
                    <div class="block-flat">
                        <form class="form-horizontal group-border-dashed" onsubmit="return false;">
                            <div class="form-group">
                                <div class="input-group">
                                    <input type="text" class="form-control" placeholder="产品编号" id="productNo"
                                           name="cardProductId"/>
                                </div>
                                <div class="input-group">
                                    <input type="text" class="form-control" placeholder="产品名称" id="productName"/>
                                </div>
                                <div class="input-group">
                                    <input type="text" class="form-control" placeholder="面值" id="face"/>
                                </div>
                                <div class="input-group">
                                    <select class="form-control" id="area">
                                        <option selected="selected" value="">销卡地区1</option>
                                        <option value="全国">全国</option>
                                        <option value="山东">山东省</option>
                                        <option value="河南">河南省</option>
                                        <option value="北京">北京市</option>
                                        <option value="天津">天津市</option>
                                        <option value="上海">上海市</option>
                                        <option value="重庆">重庆市</option>
                                        <option value="河北">河北省</option>
                                        <option value="山西">山西省</option>
                                        <option value="辽宁">辽宁省</option>
                                        <option value="吉林">吉林省</option>
                                        <option value="黑龙江">黑龙江省</option>
                                        <option value="江苏">江苏省</option>
                                        <option value="浙江">浙江省</option>
                                        <option value="安徽">安徽省</option>
                                        <option value="福建">福建省</option>
                                        <option value="江西">江西省</option>
                                        <option value="湖北">湖北省</option>
                                        <option value="湖南">湖南省</option>
                                        <option value="广东">广东省</option>
                                        <option value="海南">海南省</option>
                                        <option value="四川">四川省</option>
                                        <option value="贵州">贵州省</option>
                                        <option value="云南">云南省</option>
                                        <option value="陕西">陕西省</option>
                                        <option value="甘肃">甘肃省</option>
                                        <option value="青海">青海省</option>
                                        <option value="台湾">台湾省</option>
                                        <option value="内蒙古">内蒙古自治区</option>
                                        <option value="广西">广西壮族自治区</option>
                                        <option value="西藏">西藏自治区</option>
                                        <option value="宁夏">宁夏回族自治区</option>
                                        <option value="新疆">新疆维吾尔自治区</option>
                                        <option value="香港">香港特别行政区</option>
                                        <option value="澳门">澳门特别行政区</option>
                                    </select>
                                </div>
                                <div class="input-group">
                                    <select class="selectpicker" title="运营商"
                                            id="productType"
                                            name="productType"
                                            data-live-search="true">
                                    </select>
                                </div>
                                <div class="input-group">
                                    <select class="form-control" id="state">
                                        <option value="">状态</option>
                                        <option value="1">上架</option>
                                        <option value="0">下架</option>
                                        <option value="2">维护</option>
                                    </select>
                                </div>
                                <div class="input-group">
                                    <button class="btn btn-primary" type="button" id="search"><i
                                            class="fa fa-search"></i>查询
                                    </button>&nbsp;
                                    <button class="btn btn-success" type="button" id="success"
                                            onclick="updateStatus(1)"><i class="fa fa-reply-all"></i>上架
                                    </button>&nbsp;
                                    <button class="btn btn-danger" type="button" id="fail" onclick="updateStatus(0)"><i
                                            class="fa fa-lock"></i>下架
                                    </button>&nbsp;
                                    <button class="btn btn-danger" type="button" id="maintain"
                                            onclick="updateStatus(2)"><i
                                            class="fa fa-lock"></i>维护
                                    </button>&nbsp;
                                    <button class="btn btn-success btn-operation" type="button" id="add">
                                        <i class="fa fa-plus-square-o"></i>新增
                                    </button>&nbsp;
                                    <button class="btn btn-success btn-operation" type="button" id="editProduct">
                                        <i class="fa fa-plus-square-o"></i>修改
                                    </button>&nbsp;
                                    <button class="btn btn-danger" type="button" id="updateCardRestrict"><i
                                            class="fa fa-lock"></i>编辑校验规则
                                    </button>&nbsp;
                                    <button class="btn btn-danger" type="button" id="deleteProduct"><i
                                            class="fa fa-trash-o"></i>删除
                                    </button>&nbsp;
                                </div>
                            </div>
                        </form>
                    </div>
                    <div class="block-flat">
                        <div class="content">
                            <div class="table-responsive">
                                <table class="table hover" id="dataTable" style="word-break:break-all">
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!--新增产品-->
        <div class="modal fade" id="addProduct" tabindex="-1" role="dialog" aria-labelledby="addProductLabel">
            <div class="modal-dialog" role="document" style="width:800px;">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                                aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title" id="addProductLabel">新增产品</h4>
                    </div>
                    <div class="modal-body" style="min-height:460px;">
                        <form class="form-horizontal" role="form" id="addProductForm">
                            <input type="hidden" name="JSESSIONID">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label for="productName1" class="col-sm-4 control-label"><span
                                            class="text-danger">*</span>产品名称</label>
                                    <div class="col-sm-7">
                                        <input type="text" class="form-control"
                                               id="productName1" name="productName">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="cardProductId" class="col-sm-4 control-label"><span
                                            class="text-danger">*</span>产品编码</label>
                                    <div class="col-sm-7">
                                        <input type="text" class="form-control" name="cardProductId"
                                               id="cardProductId">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="productType1" class="col-sm-4 control-label"><span
                                            class="text-danger">*</span>运营商</label>
                                    <div class="col-sm-7">
                                        <select class="selectpicker" title="运营商"
                                                id="productType1"
                                                name="productType"
                                                data-live-search="true">
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="area" class="col-sm-4 control-label"><span
                                            class="text-danger">*</span>地区</label>
                                    <div class="col-sm-7">
                                        <input type="text" class="form-control" name="area" id="area1">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="face1" class="col-sm-4 control-label"><span
                                            class="text-danger">*</span>面值</label>
                                    <div class="col-sm-7">
                                        <input type="text" class="form-control" name="face" id="face1">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="state1" class="col-sm-4 control-label"><span
                                            class="text-danger">*</span>状态</label>
                                    <div class="col-sm-7">
                                        <select class="form-control" name="state" id="state1">
                                            <Option value="0">下架</Option>
                                            <Option value="1">上架</Option>
                                            <Option value="2">维护</Option>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="submitType" class="col-sm-4 control-label"><span
                                            class="text-danger">*</span>提交类型</label>
                                    <div class="col-sm-7">
                                        <select class="form-control" id="submitType" name="submitType">
                                            <option value="0">上传图片</option>
                                            <option value="1">卡密</option>
                                            <option value="2">二维码+链接</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="cardRestrict" class="col-sm-4 control-label"><span
                                            class="text-danger">*</span>卡号卡密校验规则</label>
                                    <div class="col-sm-7">
                                        <input type="text" class="form-control" name="cardRestrict" id="cardRestrict">
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                        <button type="button" class="btn btn-primary" id="addProductSubmit">确定</button>
                    </div>
                </div>
            </div>
        </div>
        <div class="modal fade" id="updateCardRestrictModal" tabindex="-1" role="dialog"
             aria-labelledby="cardRestrictModalLabel">
            <div class="modal-dialog" role="document">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                                aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title" id="failModalLabel">编辑卡号卡密校验规则</h4>
                    </div>
                    <div class="modal-body">
                        <form class="form-horizontal" role="form" id="cardRestrictModalForm">
                            <div class="form-group">
                                <label class="col-sm-3 control-label"><span
                                        class="text-danger">*</span>卡号卡密校验规则</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control" name="cardRestrict" id="editCardRestrict">
                                </div>
                            </div>
                        </form>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                        <button type="button" class="btn btn-primary" id="updateCardRestrictBtn">确定</button>
                    </div>
                </div>
            </div>
        </div>
        <!--修改产品-->
        <div class="modal fade" id="editProductModal" tabindex="-1" role="dialog" aria-labelledby="editProductLabel">
            <div class="modal-dialog" role="document" style="width:800px;">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                                aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title" id="editProductLabel">修改产品</h4>
                    </div>
                    <div class="modal-body" style="min-height:460px;">
                        <form class="form-horizontal" role="form" id="editProductForm">
                            <input type="hidden" name="JSESSIONID">
                            <input type="hidden" id="edit_id" name="id">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label for="productName1" class="col-sm-4 control-label"><span
                                            class="text-danger">*</span>产品名称</label>
                                    <div class="col-sm-7">
                                        <input type="text" class="form-control"
                                               id="productName2" name="productName">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="cardProductId" class="col-sm-4 control-label"><span
                                            class="text-danger">*</span>产品编码</label>
                                    <div class="col-sm-7">
                                        <input type="text" class="form-control" name="cardProductId"
                                               id="cardProductId2">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="productType1" class="col-sm-4 control-label"><span
                                            class="text-danger">*</span>运营商</label>
                                    <div class="col-sm-7" id="productType2_div">
                                        <select class="selectpicker" title="运营商"
                                                id="productType2"
                                                name="productType"
                                                data-live-search="true">
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="area" class="col-sm-4 control-label"><span
                                            class="text-danger">*</span>地区</label>
                                    <div class="col-sm-7">
                                        <input type="text" class="form-control" name="area" id="area2">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="face1" class="col-sm-4 control-label"><span
                                            class="text-danger">*</span>面值</label>
                                    <div class="col-sm-7">
                                        <input type="text" class="form-control" name="face" id="face2">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="state1" class="col-sm-4 control-label"><span
                                            class="text-danger">*</span>状态</label>
                                    <div class="col-sm-7">
                                        <select class="form-control" name="state" id="state2">
                                            <Option value="0">下架</Option>
                                            <Option value="1">上架</Option>
                                            <Option value="2">维护</Option>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="submitType" class="col-sm-4 control-label"><span
                                            class="text-danger">*</span>提交类型</label>
                                    <div class="col-sm-7">
                                        <select class="form-control" id="submitType2" name="submitType">
                                            <option value="0">上传图片</option>
                                            <option value="1">卡密</option>
                                            <option value="2">二维码+链接</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="cardRestrict" class="col-sm-4 control-label"><span
                                            class="text-danger">*</span>卡号卡密校验规则</label>
                                    <div class="col-sm-7">
                                        <input type="text" class="form-control" name="cardRestrict" id="cardRestrict2">
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                        <button type="button" class="btn btn-primary" id="editProductSubmit">确定</button>
                    </div>
                </div>
            </div>
        </div>
        <!--挂载闲鱼spu-->
        <div class="modal inmodal fade" id="myModalBySpu" tabindex="-1" role="dialog"
             aria-labelledby="addOperatorModalLabel"
             aria-hidden="true">
            <div class="modal-dialog ">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal"><span
                                aria-hidden="true">&times;</span><span class="sr-only">Close</span>
                        </button>
                        <h4 class="modal-title" id="addSpuModalLabel">闲鱼SPU模板挂载</h4>
                    </div>
                    <div class="modal-body">
                        <form class="form-horizontal m-t" id="spuForm"
                              method="post">
                            <input type="hidden" id="productType_SPU" name="productType"/>
                            <input type="hidden" id="cardProductId_SPU" name="cardProductId"/>
                            <input type="hidden" id="spuId_hidden" name="spuIdHidden"/>
                            <div class="row">
                                <div class="col-sm-12">
                                    <div class="form-group">
                                        <label class="col-sm-3 control-label">闲鱼状态：</label>
                                        <div class="col-sm-6">
                                            <div class="input-group">
                                                <select class="form-control" id="actionType"
                                                        name="actionType">
                                                    <option value="" selected>请选择</option>
                                                    <option value="0">上架</option>
                                                    <option value="1">下架</option>
                                                </select>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-3 control-label">闲鱼SPU：</label>
                                        <div class="col-sm-6">
                                            <div class="input-group">
                                                <input type="text" class="form-control"
                                                       placeholder="闲鱼spuId"
                                                       id="spuId" name="spuId"/>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-white" data-dismiss="modal">关闭
                        </button>
                        <button type="button" class="btn btn-primary" id="saveSpu">确定
                        </button>
                    </div>
                </div>
            </div>
        </div>
        <!--更新状态-->
        <div class="modal fade" id="myModal1" tabindex="-1" role="dialog" aria-labelledby="updateStatusLabel">
            <div class="modal-dialog" role="document" style="width:800px;">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                                aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title" id="updateStatusLabel">状态更新</h4>
                    </div>
                    <div class="modal-body" style="min-height: 100px;">
                        <form class="form-horizontal" role="form" id="maintainForm">
                            <input type="hidden" id="productStr" name="productStr">
                            <input type="hidden" id="handleStateCode" name="handleStateCode">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label for="remark" class="col-sm-4 control-label"><span
                                            class="text-danger"></span>操作状态:</label>
                                    <div class="col-sm-7" style="width: 240px">
                                        <input type="text" class="form-control"
                                               id="handleState" name="handleState" value="disabled" disabled>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="remark" class="col-sm-4 control-label"><span
                                            class="text-danger"></span>备注:</label>
                                    <div class="col-sm-7" style="width: 240px">
                                        <input type="text" class="form-control"
                                               id="remark" name="remark">
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                        <button type="button" class="btn btn-primary" id="toSaveRemark">确定</button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div th:include="js :: js"></div>
<script type="text/javascript" th:attr="src=@{/js/jquery.form.js}"></script>
<script type="text/javascript" th:attr="src=@{/js/jquery.parser.js}"></script>
<script type="text/javascript" src="js/jquery.icheck/icheck.min.js"></script>
<script type="text/javascript" src="/js/e/channelList.js?deVersion=20241018"></script>

</body>
</html>
